function check(){
    var obj1=document.getElementById("name");
    var obj2=document.getElementById("pass");

    if (obj1==null || obj1.value == ""){
        alert("请输入账号信息,其长度在6-12位");
        return false;
    }else if (obj2==null || obj2.value == ""){
        alert("请输入密码信息,其长度在6-12位");
        return false;
    }
}